Skip to content

fix(ui): correct inverted boolean logic in setLayerResult calls#1

Open
ZnDong wants to merge 1 commit into1193776794:mainfrom
ZnDong:fix-DetectionLayer-Display
Open

fix(ui): correct inverted boolean logic in setLayerResult calls#1
ZnDong wants to merge 1 commit into1193776794:mainfrom
ZnDong:fix-DetectionLayer-Display

Conversation

@ZnDong
Copy link

@ZnDong ZnDong commented Feb 19, 2026

Fix detection layer display showing inverted results across multiple detectors. The boolean parameter in setLayerResult(layer, detected) should be true when a risk is detected, and false when safe.

  • ReadlinkDetector: invert all setLayerResult boolean values

  • ZygoteDetector: invert all setLayerResult boolean values

  • SideChannelDetector: fix SYSCALL layer from !isHooked to isHooked in timing-based detection methods

  • DebugDetector: fix detectPtrace (TracerPid==0 was true, now TracerPid!=0 is true) and detectPtraceSelfProtection (safe condition was true, now risk condition is true)

Fix detection layer display showing inverted results across multiple detectors. The boolean parameter in setLayerResult(layer, detected) should be true when a risk is detected, and false when safe.

- ReadlinkDetector: invert all setLayerResult boolean values

- ZygoteDetector: invert all setLayerResult boolean values

- SideChannelDetector: fix SYSCALL layer from !isHooked to isHooked in timing-based detection methods

- DebugDetector: fix detectPtrace (TracerPid==0 was true, now TracerPid!=0 is true) and detectPtraceSelfProtection (safe condition was true, now risk condition is true)
ZnDong added a commit to ZnDong/launch that referenced this pull request Feb 19, 2026
…keyword substring matching

Short keywords like "su", "hide", "ksu" in SUSPICIOUS_KEYWORDS caused false positives when matched as substrings of normal paths. For example, the BLAST architecture (introduced in Android 11) produces fd paths like "/dmabuf:VRI[MainActivity]1193776794#1(BLAST Consumer)" where "Consumer" contains "su", triggering a false detection. Similar false positives occur with /dev/ashmem, result, resume, override, etc.

Solution: - Split keywords into two categories: long/unique keywords (simple substring match) and short/ambiguous keywords (word boundary match) - Add find_with_boundary() that requires non-alphanumeric chars or string boundaries around the keyword - Move "su", "hide", "ksu" to BOUNDARY_KEYWORDS with boundary-aware matching - Apply the same fix to checkMountNamespaceNative/Syscall
ZnDong added a commit to ZnDong/launch that referenced this pull request Feb 19, 2026
…keyword substring matching

Short keywords like "su", "hide", "ksu" in SUSPICIOUS_KEYWORDS caused false positives when matched as substrings of normal paths. For example, the BLAST architecture (introduced in Android 11) produces fd paths like "/dmabuf:VRI[MainActivity]1193776794#1(BLAST Consumer)" where "Consumer" contains "su", triggering a false detection. Similar false positives occur with /dev/ashmem, result, resume, override, etc.

Solution: - Split keywords into two categories: long/unique keywords (simple substring match) and short/ambiguous keywords (word boundary match) - Add find_with_boundary() that requires non-alphanumeric chars or string boundaries around the keyword - Move "su", "hide", "ksu" to BOUNDARY_KEYWORDS with boundary-aware matching - Apply the same fix to checkMountNamespaceNative/Syscall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant